package net.btd.city;

import javax.microedition.lcdui.*;


public class Displayable1 extends Form implements CommandListener {
    public Displayable1() {
        super("Displayable Title");
        try {
            jbInit();
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    }

    private void jbInit() throws Exception {
        setCommandListener(this);
        addCommand(new Command("Exit", Command.EXIT, 1));
        textField1.setLabel("textField1");
        textField1.setPreferredSize(161, 72);
        this.append(textField1);
        this.append(textField2);
        this.append(gauge1);
        textField2.setLabel("textField2");
        textField2.setPreferredSize(163, 69);
        gauge1.setLabel("gauge1");
        gauge1.setPreferredSize(156, 114);
    }

    public void commandAction(Command command, Displayable displayable) {
        if (command.getCommandType() == Command.EXIT) {
            // stop the MIDlet
            BTDMIDlet.quitApp();
        }
    }

    TextField textField1 = new TextField("", "", 15, TextField.ANY);
    TextField textField2 = new TextField("", "", 15, TextField.ANY);
    Gauge gauge1 = new Gauge("", true, 10, 0);

}
